# 递归函数
def fab_func(n):
    if n == 1 or n ==2:
        return 1        # F(1) = F(2) = 1
    return fab_func(n-1) + fab_func(n-2)
print(fab_func(9))

# 匿名函数
# bmi = lambda s, w : w / s**2
# print(f"bmi:{bmi(1.8,60)}")

# 密码复杂度
# def length(pw):
#     global grade
#     global result
#     if len(pw) >=8:
#         grade += 1
#     else:
#         result.append("长度小于8")
# 
# def char(pw):
#     global grade
#     global result
#     flag = [0, 0, 0, 0]
#     # symbol = ['_', '!', '@', '#']
#     for i in pw:
#         if i.isupper():
#             flag[0] = 1
#         elif i.islower():
#             flag[1] = 1
#         elif i.isdigit():
#             flag[2] = 1
#         # elif i in symbol:
#         elif ord(i) < 48 or 58 <= ord(i) < 65 or 91 <= ord(i) < 97 or ord(i) >= 123:
#             flag[3] = 1
#     if sum(flag) >= 3:
#             grade += 1
#     else:
#         result.append("密码没有由3种以上字符组成")
# 
# def sub_str(pw):
#     global grade
#     global result
#     for i in range(len(pw)-2):
#         if pw.count(pw[i: i+3]) >= 2:
#             result.append("长度超过或等于3的子串重复")
#             break
#         elif i == len(pw) -3:
#             grade += 1
# 
# def default():
#     global grade
#     global result
#     grade = 2
#     result = list()
#     pw = input("请输入密码:")
#     length(pw)
#     char(pw)
#     sub_str(pw)
#     return grade
# 
# def pw_complex():
#     print(f"return {default()},{result}")
# 
# pw_complex()

